import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home.vue'
// import { resolve } from 'path';

Vue.use(Router)

const router = new Router({
	routes:[
		{
			path: '/',
			component: Home,
			children:[
				{
					path: '/',
					component: (resovle) => {
						require(['../views/index.vue'], resovle)
					}
				},
				// 设备详情
				{
					path: 'data',
					component: (resovle) => {
					  require(['../views/res-data/Details.vue'], resovle)
					}
				}
			]
		}
	]
})


export default router;